package com.htu.service.impl;

import com.htu.dao.ICartDao;
import com.htu.domain.Cart;
import com.htu.service.ICartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartServiceImpl implements ICartService
{
    @Autowired
    private ICartDao dao;

    @Override
    public List<Cart> queryCartById (int id)
    {
        return dao.queryCartById(id);
    }

    @Override
    public boolean doUpdateCart(int id,String name,int count)
    {
        return dao.doUpdateCart(id,name, count);
    }

    @Override
    public boolean doCartDelete(int id, String name)
    {
        return dao.doCartDelete(id, name);
    }

    @Override
    public boolean doCartInsert(Cart cart)
    {
        return dao.doCartInsert( cart);
    }


}
